#include "stdafx.h"
#include <osg/PositionAttitudeTransform>
int UCPositionAttitudeTransform()
{
	
    Group* root=new Group();
	Node* cowNode=osgDB::readNodeFile ("cow.osg");
	PositionAttitudeTransform *pat=new PositionAttitudeTransform();
	pat->setScale(Vec3d(0.5f,0.5f,0.5f));
	pat->setPosition(Vec3d(-10.0f,0.0f,0.0f));
	pat->addChild(cowNode);
	root->addChild (pat);

	PositionAttitudeTransform *pat2=new PositionAttitudeTransform();
	pat2->setScale(Vec3d(2.0f,2.0f,2.0f));
	pat2->setPosition(Vec3d(10.0f,0.0f,0.0f));
	pat2->addChild(cowNode);
	root->addChild (pat2);
    osgViewer::Viewer* pViewer=new osgViewer::Viewer();
	pViewer->setSceneData(root);
	pViewer->realize();
	pViewer->run();
	return 0;
}
